package mylibrary.io;

import java.io.File;

public class DirList {

	public static void main(String[] args) {
		
		System.out.println(System.getProperty("user.dir"));
		
		File path = new File("/");
		
		String[] list;
		
		if(args.length == 0) { 
			list = path.list();
			//list = path.list(new DirFilter());
		} else {
			list = path.list(new DirFilter());
		}
		
		for (int i = 0; i < list.length; i++) {
			System.out.println(list[i]);
		}
	}
}
